import request from "@/request/index";

export function postEdit(post) {
    return request.post("/admin/post/add", {
        ...post
    });
}

export function getPost(id) {
    return request.get("/post/query/id/" + id);
}

export function getPostList(post) {
    console.log(post)
    return request.post("/post/query/or", {...post});
}

export function getPostListByIdList(post){
    return request.post("/post/query/and", {...post});
}

export function toLook(id) {
    return request.get("/post/user/look/" + id);
}

export function toThumb(flag, id) {
    return request.get("/post/user/thumbs/" + flag + "/" + +id);
}

export function toCollect(flag, id) {
    return request.get("/post/user/collect/" + flag + "/" + id);
}

export function getAllNum(id) {
    return request.get("/post/user/allnum/" + id);
}

export function getLookIdList(page) {
    return request.post("/post/user/ids/look",{...page});
}

export function getCollectIdList(page) {
    return request.post("/post/user/ids/collect",{...page});
}
